package com.deyuanyun.pic.ctrl.controller.vo;

import com.deyuanyun.pic.common.util.StringUtils;

import java.util.Date;

/**
 *  外检项目编辑或新增VO
 *  @author axiao(xj08.dream@gmail.com)
 *  @date 2016-09-23
 *  @version 1.0
 *  Histroy: [修改人][时间][描述]
 */
public class ExinspTaskUpdateOrCreateVO {

    private String id;

    private String name;//项目名称

    private String pipeLineId;//管道id

    private String fromPointId; //起点位置id

    private String fromPointType; //起点位置类型

    public Long fromPointMileage; //起点绝对里程

    private String toPointId;//终点位置id

    public Long toPointMileage; //终点绝对里程

    private String toPointType; //终点位置类型

    private String testingCompany;//检测单位

    private Date testingDateFrom; //检测日期_起

    private Date testingDateTo; //检测日期_止

    private String testCon;//检测内容，主要用户保存数据

    private Short testContent;//检测内容

    private String testMeth;//检测方法，主要用户保存数据

    private Short testMethod; //检测方法

    private String methodOther; //检测方法为其它的时候有值

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPipeLineId() {
        return pipeLineId;
    }

    public void setPipeLineId(String pipeLineId) {
        this.pipeLineId = pipeLineId;
    }

    public String getFromPointId() {
        return fromPointId;
    }

    public void setFromPointId(String fromPointId) {
        this.fromPointId = fromPointId;
    }

    public String getFromPointType() {
        return fromPointType;
    }

    public void setFromPointType(String fromPointType) {
        this.fromPointType = fromPointType;
    }

    public Long getFromPointMileage() {
        return fromPointMileage;
    }

    public void setFromPointMileage(Long fromPointMileage) {
        this.fromPointMileage = fromPointMileage;
    }

    public String getToPointId() {
        return toPointId;
    }

    public void setToPointId(String toPointId) {
        this.toPointId = toPointId;
    }

    public Long getToPointMileage() {
        return toPointMileage;
    }

    public void setToPointMileage(Long toPointMileage) {
        this.toPointMileage = toPointMileage;
    }

    public String getToPointType() {
        return toPointType;
    }

    public void setToPointType(String toPointType) {
        this.toPointType = toPointType;
    }

    public String getTestingCompany() {
        return testingCompany;
    }

    public void setTestingCompany(String testingCompany) {
        this.testingCompany = testingCompany;
    }

    public Date getTestingDateFrom() {
        return testingDateFrom;
    }

    public void setTestingDateFrom(Date testingDateFrom) {
        this.testingDateFrom = testingDateFrom;
    }

    public Date getTestingDateTo() {
        return testingDateTo;
    }

    public void setTestingDateTo(Date testingDateTo) {
        this.testingDateTo = testingDateTo;
    }

    public String getTestCon() {
        return testCon;
    }

    public void setTestCon(String testCon) {
        this.testCon = testCon;
    }

    public Short getTestContent() {
        if(StringUtils.isNotEmpty(testCon)) {
            return Integer.valueOf(testCon, 2).shortValue();
        } else {
            return 0;
        }
    }

    public void setTestContent(Short testContent) {
        this.testContent = testContent;
    }

    public String getTestMeth() {
        return testMeth;
    }

    public void setTestMeth(String testMeth) {
        this.testMeth = testMeth;
    }

    public Short getTestMethod() {
        if(StringUtils.isNotEmpty(testMeth)) {
            return Integer.valueOf(testMeth, 2).shortValue();
        } else {
            return 0;
        }
    }

    public void setTestMethod(Short testMethod) {
        this.testMethod = testMethod;
    }

    public String getMethodOther() {
        return methodOther;
    }

    public void setMethodOther(String methodOther) {
        this.methodOther = methodOther;
    }
}
